package com.example.demo;

import com.example.demo.serivce.LoginService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext context
				= SpringApplication.run(DemoApplication.class, args);
		context.getBean(LoginService.class).login();//可以不用管具体是哪个类实现了LoginService
	}
}
